package com.tct.worktimeboard.service;

import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import com.tct.worktimeboard.entity.Project;
import com.tct.worktimeboard.entity.Work;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tct.worktimeboard.entity.WorkTask;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author liyongkui
 * @since 2021-02-22
 */
public interface IWorkService extends IService<Work> {
    JSONObject getWork(Work work);
    JSONObject addWork(Work work);
    JSONObject updateWork(Work work);
    JSONObject deleteWork(List<Integer> idList);

    JSONObject listPageByMakeUserIdAndMakeStatus(Work work);
    void listPageByMakeUserIdAndMakeStatusDownloadExcel(HttpServletResponse response, Work work) throws Exception;

    JSONObject listPageByUserIdAndMakeStatus(Work work);
    void listPageByUserIdAndMakeStatusDownloadExcel(HttpServletResponse response,Work work) throws Exception;

    PageInfo<Project> countByProjectAndUserId(Project project);
    void countGroupByProjectAndUserIdDownloadExcel(HttpServletResponse response,Project project) throws Exception;

    JSONObject countGroupByGroupType(Long groupTypeId);
    void countGroupByGroupTypeDownloadExcel(HttpServletResponse response,Long groupTypeId) throws Exception;

    JSONObject countGroupByUserId(Work work);
    void countGroupByUserIdDownloadExcel(HttpServletResponse response, Work work) throws Exception;

    JSONObject countGroupByMakeUserId(Work work);
    void countGroupByMakeUserIdDownloadExcel(HttpServletResponse response,Work work) throws Exception;

    JSONObject countGroupByWorkKindId(String workName);
    void countGroupByWorkKindIdDownloadExcel(HttpServletResponse response, String workName) throws Exception;

    JSONObject countGroupByWorkTask(WorkTask workTask);

    JSONObject listPageByCondition(Work work);

}
